package day03;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

/**
 * 输入某人生日，格式为"yyyy-MM-dd"，输出到现在为止经过了多少周。
 * @author Bonnie
 *
 */
public class Test03 {
    public static void main(String[] args) throws ParseException {
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入生日yyyy-MM-dd");
        String next = scanner.next();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date parse = simpleDateFormat.parse(next);
        long time = parse.getTime();
        Date date = new Date();
        long time1 = date.getTime();
        long till=time1-time;
        System.out.println("经过了"+till/1000/24/60/60/7+"周");
    }
}
